
package com.turing.data.service.excel.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.turing.data.dao.excel.ExportInfoMapper;
import com.turing.data.model.domain.excel.ExportInfo;
import com.turing.data.service.excel.ExportInfoService;
import lombok.AllArgsConstructor;

/**
 * @Description 导出基础表，记录各个场景的导出类型服务类实现
 * @Author lcy
 * @Date 2021-08-09
 */
@Service
@AllArgsConstructor
public class ExportInfoServiceImpl extends ServiceImpl<ExportInfoMapper, ExportInfo> implements ExportInfoService {

    @Override
    public ExportInfo getByTemplateId(String templateId) {
        LambdaQueryWrapper<ExportInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ExportInfo::getTemplateId, templateId);
        return this.getOne(queryWrapper);
    }
}
